<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<ui:composition template="/resources/template/template.xhtml">

	<ui:define name="title">
		<h:outputText value="Recherche de blog" />
	</ui:define>

	<ui:define name="content">
		<h:form>
			<p:panel header="Recherche">
				<h:panelGrid columns="3">
					<p:outputLabel value="NOM" for="idRechercheNom" />
					<p:inputText id="idRechercheNom" value="#{rechercherBlogBean.nom}" />
					<p:commandButton icon="ui-icon-search" action="#{rechercherBlogBean.rechercher}" update="@widgetVar(_datatableBlog)" />
				</h:panelGrid>
			</p:panel>
		</h:form>

		<h:form>
			<p:dataTable widgetVar="_datatableBlog" value="#{rechercherBlogBean.listeBlog}" var="blog" scrollable="true" scrollHeight="300" emptyMessage="Aucun blog">

				<f:facet name="header">
					<h:outputText value="Mes blogs" />
				</f:facet>

				<p:column>
					<p:link styleClass="ui-icon ui-icon-search" outcome="pretty:detail-blog">
						<f:param name="blogId" value="#{blog.id}" />
					</p:link>
				</p:column>

				<p:column>
					<f:facet name="header">
						<h:outputText value="NOM" />
					</f:facet>
					<h:outputText value="#{blog.nom}" />
				</p:column>

				<p:column>
					<f:facet name="header">
						<h:outputText value="DESCRIPTION" />
					</f:facet>
					<h:outputText value="#{blog.description}" />
				</p:column>

				<p:column>
					<f:facet name="header">
						<h:outputText value="DATE CREATION" />
					</f:facet>
					<h:outputText value="#{blog.dateCreation}">
						<f:convertDateTime pattern="dd/MM/yyyy HH:mm:ss" />
					</h:outputText>
				</p:column>

			</p:dataTable>
		</h:form>

	</ui:define>

	<ui:define name="dialog">

	</ui:define>

</ui:composition>
</html>